
#include "Peer.hpp"

void Peer::send(unsigned char chID,const bytes &data)
{
    m_session_->send(chID, data);
}

std::string Peer::toString()
{
    char res[50];
    if(outbound_)
        sprintf(res,"Peer {%s} out",address().toIpPort());
    else 
        sprintf(res,"Peer {%s} in",address().toIpPort());
        
    return std::string(res);
}